/**
 * 
 */
package chess;

/**
 * <pre>
 * Max Joyce
 * -Created initial Class 01/21/10)
  * Andrew Jeffery 
 * -Added line  Movement Behaviour of a Rook(01/22/10)(removed and refactored to LineMover)
 * </pre>
 *
 */
public class RookPiece extends LineMover{
	public static final String ROOK = "Rook";
	
	/**
	 * @param p The player that this piece belongs to
	 * @param t The location that the piece should be in
	 */
	public RookPiece(Player p, Tile t) {
		super(p, t);
		this.moveStyle.add(LineMover.NORTH);
		this.moveStyle.add(LineMover.SOUTH);
		this.moveStyle.add(LineMover.EAST);
		this.moveStyle.add(LineMover.WEST);
	}
	
		
	/**
	 * @return Returns a string representation of the piece
	 */
	public String toString() {
		if (player.getColour().equals("Black")){
			return "R";
		}
		else if (player.getColour().equals("White")){
			return "r";
		}
		return ".";
	}
	public String getName(){
		return ROOK;
	}

}
